package demoCom;

public class Tect {
    public static void main(String[] args) {
        Student student1 = new Student("b",1);
        Student student2 = new Student("a",2);
        System.out.println(student1.compareTo(student2));
        NameComparator nameComparator = new NameComparator();
       int ret = nameComparator.compare(student1, student2);
       if (ret > 0){
           System.out.println("student1 > student2 ");
       }else if (ret == 0){
           System.out.println("student1 ==   student2");
       }else {
           System.out.println("student1 < student2");
       }
       IdComparator  idComparator = new IdComparator();
       int ret2 = idComparator.compare(student1, student2);
        if (ret2 > 0){
            System.out.println("student1 > student2 ");
        }else if (ret2 == 0){
            System.out.println("student1 ==   student2");
        }else {
            System.out.println("student1 < student2");
        }
    }
}
